VERSION 5.00
Begin VB.Form ClinicCondomForm 
   BackColor       =   &H00FFFFFF&
   BorderStyle     =   0  'None
   ClientHeight    =   9000
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   12000
   LinkTopic       =   "Form1"
   ScaleHeight     =   9000
   ScaleWidth      =   12000
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VCT.TouchKeyPad TouchKeyPad 
      Height          =   4095
      Left            =   840
      TabIndex        =   8
      Top             =   4560
      Width           =   3495
      _ExtentX        =   6165
      _ExtentY        =   7223
   End
   Begin VB.CommandButton Clear_Button 
      Caption         =   "Clear"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   9600
      TabIndex        =   2
      Top             =   6360
      Width           =   1935
   End
   Begin VB.CommandButton Next_Button 
      Caption         =   "Save"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   9600
      TabIndex        =   1
      Top             =   5160
      Width           =   1935
   End
   Begin VB.CommandButton Cancel_Button 
      BackColor       =   &H008080FF&
      Caption         =   "Cancel"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   9600
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   7560
      Width           =   1935
   End
   Begin VB.Label Star 
      BackColor       =   &H00C0FFFF&
      Caption         =   "*"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   24
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   495
      Index           =   3
      Left            =   900
      TabIndex        =   9
      Top             =   1320
      Width           =   255
   End
   Begin VB.Label NumCondom_Data 
      BackColor       =   &H00C0FFFF&
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   3900
      TabIndex        =   7
      Top             =   1320
      Width           =   1455
   End
   Begin VB.Label Label2 
      BackColor       =   &H00C0FFFF&
      Caption         =   "Condoms Given by CO:"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1140
      TabIndex        =   6
      Top             =   1320
      Width           =   2535
   End
   Begin VB.Line SexColorLine 
      BorderColor     =   &H00FFC0C0&
      BorderWidth     =   10
      X1              =   300
      X2              =   300
      Y1              =   720
      Y2              =   2640
   End
   Begin VB.Label ClientSexLabel 
      BackColor       =   &H00C0FFFF&
      Caption         =   "Client Sex Goes Here"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   900
      TabIndex        =   5
      Top             =   480
      Width           =   2415
   End
   Begin VB.Label ClientCode_Data 
      BackColor       =   &H00C0FFFF&
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   3900
      TabIndex        =   4
      Top             =   840
      Width           =   1455
   End
   Begin VB.Label ClientCode_Label 
      BackColor       =   &H00C0FFFF&
      Caption         =   "Client Code:"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1140
      TabIndex        =   3
      Top             =   840
      Width           =   1695
   End
   Begin VB.Shape Shape2 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   1  'Opaque
      BorderColor     =   &H00000000&
      BorderWidth     =   2
      Height          =   3015
      Left            =   300
      Shape           =   4  'Rounded Rectangle
      Top             =   240
      Width           =   5295
   End
End
Attribute VB_Name = "ClinicCondomForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Cancel_Button_Click()
   VCTStageForm.Show
   Unload Me
End Sub

Private Sub Clear_Button_Click()
   NumCondom_Data.Caption = ""
   Next_Button.Enabled = False
   TouchKeyPad.Enabled = True
End Sub

Private Sub Form_Load()
   Next_Button.Enabled = False
   ClientCode_Data.Caption = CLIENTCO
   If SEX = "1" Then
      ClientSexLabel.Caption = "Male Client"
      SexColorLine.BorderColor = vbBlue
   Else
      If SEX = "2" Then
         ClientSexLabel.Caption = "Female Client"
         SexColorLine.BorderColor = vbGreen
      Else
         ClientSexLabel.Caption = "ERROR"
         SexColorLine.BorderColor = vbRed
      End If
   End If
End Sub

Private Sub Next_Button_Click()

   CLINCOND = NumCondom_Data.Caption
   PRINTED = "1"
   'save the data to the database
   CnUser.Open ConnectString
   Cmd.CommandText = "UPDATE client " & _
                     "SET TIMECLNC = '" & Format(Now(), "hh:mm:ss") & "', " & _
                     "STID1 = '" & STID1 & "', " & _
                     "STID2 = '" & STID2 & "', " & _
                     "STID3 = '" & STID3 & "', " & _
                     "STID4 = '" & STID4 & "', " & _
                     "STID5 = '" & STID5 & "', " & _
                     "STID6 = '" & STID6 & "', " & _
                     "STID7 = '" & STID7 & "', " & _
                     "STIT1 = '" & STIT1 & "', " & _
                     "STIT2 = '" & STIT2 & "', " & _
                     "STIT3 = '" & STIT3 & "', " & _
                     "STIT4 = '" & STIT4 & "', " & _
                     "STIT5 = '" & STIT5 & "', " & _
                     "STIT6 = '" & STIT6 & "', " & _
                     "STIT7 = '" & STIT7 & "', " & _
                     "CLINCOND = " & CLINCOND & ", " & _
                     "PRINTED = '" & PRINTED & "' " & _
                     "WHERE VISITID = " & VISITID
   Cmd.CommandType = adCmdText
   Cmd.ActiveConnection = CnUser
   Cmd.Execute
   CnUser.Close

   VCTStageForm.Show
   Unload Me
End Sub

Private Sub TouchKeyPad_NumPressed()
   Next_Button.Enabled = True
   NumCondom_Data.Caption = NumCondom_Data.Caption & TouchKeyPad.KeyNum
   If Len(NumCondom_Data.Caption) >= 3 Then
      TouchKeyPad.Enabled = False
   End If
End Sub
